/**
 * 侧边栏样式
 */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
  color: rgba(255, 255, 255, 0.9);
  z-index: 100;
  transition: width 0.3s ease;
  overflow-x: hidden;
  box-shadow: var(--shadow);
}

/* Logo区域 */
.sidebar .logo {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .logo img {
  height: 40px;
  width: auto;
  margin-right: 0.75rem;
}

.sidebar .logo span {
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* 导航菜单 */
.sidebar .sidebar-nav {
  padding: 1rem 0;
}

.sidebar .sidebar-nav .nav-heading {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.75rem 1.5rem 0.5rem;
}

.sidebar .sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .sidebar-nav ul li {
  margin: 0.25rem 0;
}

.sidebar .sidebar-nav ul li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
}

.sidebar .sidebar-nav ul li a:hover,
.sidebar .sidebar-nav ul li a.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .sidebar-nav ul li a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #fff;
}

.sidebar .sidebar-nav ul li a i,
.sidebar .sidebar-nav ul li a svg {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

.sidebar .sidebar-nav ul li a span {
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* 底部区域 */
.sidebar .sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .sidebar-footer .logout-btn {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
}

.sidebar .sidebar-footer .logout-btn i,
.sidebar .sidebar-footer .logout-btn svg {
  margin-right: 0.75rem;
}

.sidebar .sidebar-footer .logout-btn span {
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.sidebar .sidebar-footer .logout-btn:hover {
  color: #fff;
}

/* 侧边栏折叠状态 */
.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .sidebar .logo span,
.sidebar-collapsed .sidebar .sidebar-nav ul li a span,
.sidebar-collapsed .sidebar .sidebar-footer .logout-btn span {
  opacity: 0;
  visibility: hidden;
}

/* 响应式调整 */
@media (max-width: 991px) {
  .sidebar {
    width: var(--sidebar-collapsed-width);
  }
  
  .sidebar .logo span,
  .sidebar .sidebar-nav ul li a span,
  .sidebar .sidebar-footer .logout-btn span {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  
  .sidebar.mobile-active {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  
  .sidebar-toggle {
    display: block;
  }
} 